package mathematics.square;

/**
 * @author 杜伟毅
 * @version 1.0
 * @since 2024/11/08
 */
public class Test {

    public void test(Integer side, Integer wide, Square<Integer> square) {
        System.out.println(square.area(side, wide));
    }
    public void test(Double side, Double wide, Square<Double> square) {
        System.out.println(square.area(side, wide));
    }

    public void parallelogramArea(Integer side, Integer height, Square<Integer> square) {
        System.out.println(square.parallelogramArea(side, height));
    }

    public void trapezoidArea(Integer upBase, Integer botBase, Integer height, Square<Integer> square) {
        System.out.println(square.trapezoidArea(upBase,botBase, height));
    }

    @org.junit.Test
    public void test() {
        test(8.6,6.5,new AreaDouble());
        test(8,6,new AreaInteger());
    }
    @org.junit.Test
    public void test2() {
        parallelogramArea(2,6,new AreaInteger());
        trapezoidArea(2,6,6,new AreaInteger());
    }
}
